﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SupervisorModels;
using SupervisorInterfaces;

namespace SupervisorControllers
{
    public class Cls_Controllers
    {
        Cls_GroupCollection groupCollection;
        Cls_AccessCollection accessCollection;
        Cls_Message message;
        Cls_User user;

        public Cls_Controllers()
        {
            groupCollection = new Cls_GroupCollection();
            accessCollection = new Cls_AccessCollection();
            message = new Cls_Message();
            user = new Cls_User();
        }

        public bool CreateMessage(string broadcastMessage, string groupName)
        {
            return message.CreateMessage(broadcastMessage, groupName);
        }

        public bool CreateGroup(string groupName)
        {
            return groupCollection.CreateGroup(groupName);
        }

        //public bool UserCloseWindow(string password)
        //{
        //    //return user.UserCloseWindow(password);
        //}

        public bool ChangePassword(string oldPassword, string newPassword)
        {
            return accessCollection.ChangePassword(oldPassword, newPassword);
        }

    }
}
